x86/HVM: add new functions to get/set memory types
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 4 Aug 2016 08:01:57 +0000 (10:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Aug 2016 08:01:57 +0000 (10:01 +0200)
commitda25b27bd7872612ab57a22a47913c68f43e3910
tree1f2754226b2fdcbb039c61238aed07cb036f8d1a
parentcb34624af5f7a6c754221ec89838a74f2f9a2dc9
x86/HVM: add new functions to get/set memory types

For clarity this patch breaks the code to set/get memory types out
of do_hvm_op() into dedicated functions: hvmop_set/get_mem_type().
Also, for clarity, checks for whether a memory type change is allowed
are broken out into a separate function called by hvmop_set_mem_type().

There is no intentional functional change in this patch.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c